{% extends "simple_cfp/cfp_base.html" %}
{% load i18n %}
{% block content %}
<div id="content-main">
    <style type="text/css">
        .cfp_form_error { color: #FF0000; font-weight: bold }
    </style>

    <p>
    Please fill out this form to register as a speaker. Once you register as
    a speaker, you can submit presentations.
    </p>

    <p>
    The fields in <b>bold</b> are required.
    </p>

    <form method="post" action="." enctype="multipart/form-data">
    <h3>Contact Info</h3>
    <p>
    This is the name and email we will contact you at.
    This can be the same or different from the speaker info below.
    </p>

    <table>
    {% if form.contact_name.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.contact_name.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_contact_name"><b>Contact Name:</b></label></td>
        <td>{{ form.contact_name }}</td>
    </tr>
    {% if form.contact_email.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.contact_email.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_contact_email"><b>Contact Email:</b></label></td>
        <td>{{ form.contact_email }}</td>
    </tr>
    </table>

    <h3>Speaker Info</h3>
    <table>
    {% if form.salutation.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.salutation.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_salutation">Salutation:</label></td>
        <td>{{ form.salutation }}</td>
    </tr>
    {% if form.first_name.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.first_name.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_first_name"><b>First Name:</b></label></td>
        <td>{{ form.first_name }}</td>
    </tr>
    {% if form.last_name.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.last_name.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_last_name"><b>Last Name:</b></label></td>
        <td>{{ form.last_name }}</td>
    </tr>
    {% if form.title.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.title.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_title">Title:</label></td>
        <td>{{ form.title }}</td>
    </tr>
    {% if form.org.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.org.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_org">Organization:</label></td>
        <td>{{ form.org }}</td>
    </tr>
    {% if form.phone.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.phone.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_phone">Phone:</label></td>
        <td>{{ form.phone }}</td>
    </tr>
    {% if form.zip.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.zip.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_zip"><b>Zip/Postal Code:</b></label></td>
        <td>{{ form.zip }}</td>
    </tr>
    {% if form.email.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.email.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_email"><b>Speaker Email:</b></label></td>
        <td>{{ form.email }}</td>
    </tr>
    {% if form.url.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.url.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_url">Website:</label></td>
        <td>{{ form.url }}</td>
    </tr>
    {% if form.bio.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.bio.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_bio">Speaker Biography:</label></td>
        <td>{{ form.bio }}</td>
    </tr>
    {% if upload %}
    {% if form.file.errors %}
    <tr>
        <td colspan="2" class="cfp_form_error">{{ form.file.errors|join:", " }}</td>
    </tr>
    {% endif %}
    <tr>
        <td><label for="id_file">Photo:</label></td>
        <td>{{ form.photo_upload }}</td>
    </tr>
    {% endif %}
    </table>

    {% if recaptcha_html %}
        {% autoescape off %}
            {{ recaptcha_html }}
        {% endautoescape %}
    {% endif %}

    <p>
    <input type="submit" value="Register" />
    </p>
    </form>
</div>
{% endblock %}
